package org.stvd.entities.admin;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;
import org.stvd.entities.base.BaseEntity;

/**
 * 系统菜单-实体类
 * @author houzx
 */
@Entity
@Table(name = "menus")
public class Menus extends BaseEntity {
    private static final long serialVersionUID = 8094778831337259505L;
    
    /**
     * 菜单ID
     */
    @Id
    @Column(name="menu_id",nullable=false)
    private String menuId = "";
    
    /**
     * 上级ID
     */
    @Column(name="upper_id",nullable=false)
    private String upperId = "";
    
    /**
     * 平台GUID
     */
    @Column(name="guid",nullable=false)
    private String guid = "";
    
    /**
     * 菜单名称
     */
    @Column(name="menucaption",nullable=false)
    @NotEmpty(message="菜单名称不能为空！")
    private String menuCaption = "";
    
    /**
     * 访问地址
     */
    @Column(name="httpaddress",nullable=false)
    @NotEmpty(message="访问地址不能为空！")
    private String httpAddress = "";
    
    /**
     * 菜单状态
     */
    @Column(name="state",nullable=true)
    private String state = "";
    
    /**
     * 菜单类型
     */
    @Column(name="type",nullable=true)
    private String type = "";
    
    /**
     * 菜单图标
     */
    @Column(name="icon",nullable=true)
    private String icon = "";
    
    /**
     * 排序编号
     */
    @Column(name="orderno",nullable=false)
    @NotNull(message="优先级不能为空！")
    @Min(message="菜单排序号请输入100000~999999之间的整数！", value = 100000)
    @Max(message="菜单排序号请输入100000~999999之间的整数！", value = 999999)
    private Integer orderNo = 0;
    
    /**
     * 目标地址
     */
    @Column(name="target",nullable=true)
    private String target = "";

	public String getMenuId() {
		return menuId;
	}

	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}

	public String getUpperId() {
		return upperId;
	}

	public void setUpperId(String upperId) {
		this.upperId = upperId;
	}

	public String getGuid() {
		return guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	public String getMenuCaption() {
		return menuCaption;
	}

	public void setMenuCaption(String menuCaption) {
		this.menuCaption = menuCaption;
	}

	public String getHttpAddress() {
		return httpAddress;
	}

	public void setHttpAddress(String httpAddress) {
		this.httpAddress = httpAddress;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Integer getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(Integer orderNo) {
		this.orderNo = orderNo;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}
   
}
            